import java.util.Scanner;

public class Main1020 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int a=sc.nextInt();
        int x=a%10;//7
        int y=(a/10)%10;//6
        int z=a/100;//1`
        int b=x*100+y*10+z;
        System.out.println(a+b);
    }
}
